<%@ taglib prefix="s" uri="/struts-tags"%>

<!--Responsive navigation button-->  
        <div class="resBtn">
            <a href="#"><span class="icon16 minia-icon-list-3"></span></a>
        </div>
        
        <!--Left Sidebar collapse button-->  
        <div class="collapseBtn leftbar">
             <a href="#" class="tipR" title="Hide Left Sidebar"><span class="icon12 minia-icon-layout"></span></a>
        </div>

        <!--Sidebar background-->
        <div id="sidebarbg"></div>
        <!--Sidebar content-->
        <div id="sidebar">

            <div class="shortcuts">
                <ul>
                    <li><a href="#" title="Support section" class="tip"><span class="icon24 icomoon-icon-support"></span></a></li>
                    <li><a href="#" title="Database backup" class="tip"><span class="icon24 icomoon-icon-database"></span></a></li>
                    <li><a href="#" title="Sales statistics" class="tip"><span class="icon24 icomoon-icon-pie-2"></span></a></li>
                    <li><a href="#" title="Write post" class="tip"><span class="icon24 icomoon-icon-pencil"></span></a></li>
                </ul>
            </div><!-- End search -->            

            <div class="sidenav">

                <div class="sidebar-widget" style="margin: -1px 0 0 0;">
                    <h5 class="title" style="margin-bottom:0">Navigation</h5>
                </div><!-- End .sidenav-widget -->
				<s:if test="#session.role=='admin'">	
                <div class="mainnav">
                    <ul>
                        <li><a href="userList.action" <s:if test="page == 'User'"> class="current" </s:if>><span class="icon16 icomoon-icon-user"></span>User</a></li>
                        <li><a href="makeList.action" <s:if test="page == 'Make'"> class="current" </s:if>><span class="icon16 icomoon-icon-snowflake"></span>Make</a></li>
                        <li><a href="marketList.action" <s:if test="page == 'Market'"> class="current" </s:if>><span class="icon16 icomoon-icon-stats-up"></span>Market</a></li>                        
                        <li><a href="roleList.action" <s:if test="page == 'Role'"> class="current" </s:if>><span class="icon16 brocco-icon-location-2"></span>Role</a></li>
                        <li><a href="responsibilityList.action" <s:if test="page == 'Responsibility'"> class="current" </s:if>><span class="icon16 entypo-icon-book"></span>Responsibility</a></li>
                        <li><a href="segmentList.action" <s:if test="page == 'Segment'"> class="current" </s:if>><span class="icon16 minia-icon-grid"></span>Segment</a></li>
                        <li><a href="scenarioList.action" <s:if test="page == 'Scenario'"> class="current" </s:if>><span class="icon16 minia-icon-list-3"></span>Scenario</a></li>
                        <li><a href="nodeHierarchyHome.action" <s:if test="page == 'Node Hierarchy'"> class="current" </s:if>><span class="icon16 icomoon-icon-compass"></span>Node Hierarchy</a></li>
                        <li><a href="nodeAttributeHome.action" <s:if test="page == 'Node Attribute'"> class="current" </s:if>><span class="icon16 minia-icon-target"></span>Node Attributes</a></li>
                        <li><a href="entrySetHome.action" <s:if test="page == 'Entry Set'"> class="current" </s:if>><span class="icon16 silk-icon-notebook"></span>Entry Sets</a></li>
                        
                    </ul>
                </div>
                </s:if>
                <s:elseif test="#session.role=='writer'">
                   <div class="mainnav" style="margin-left: 0px;margin-top: 40px;">
                     <!-- 
                     <ul id="browser1" class="filetree">
						<li><span class="folder">Folder 1</span>
							<ul>
								<li><span class="file">Item 1.1</span></li>
							</ul>
						</li>
						<li><span class="folder">Folder 2</span>
									<ul>
										<li><span class="folder"><a class="navTree" href="google.com">Subfolder 2.1</a></span>
											<ul id="folder21">
												<li><span class="file">File 2.1.1</span></li>
												<li><span class="file">File 2.1.2</span></li>
											</ul>
										</li>
										<li><span class="file">File 2.2</span></li>
									</ul>
						</li>
								<li class="closed"><span class="folder">Folder 3 (closed at start)</span>
									<ul>
										<li><span class="file">File 3.1</span></li>
									</ul>
								</li>
								<li><span class="file">File 4</span></li>
						</ul>
						 -->
						
						<ul id="browser" class="filetree" style="height: 450px;overflow: auto;overflow-x: hidden;border-bottom: 1px solid gray;">
						  <s:set var="preMakeId" value="0" />
						  <s:set var="checkFlag" value="0" />
						  
						  <s:iterator value="%{#application.ALL_MAKE_MARKET}" id="makeMarketList">
						     	  
						    <s:set var="currentMakeId" value="makeId" />
						    
						    <s:if test="#currentMakeId==#preMakeId">
						        <s:set var="checkFlag" value="0" />
						        <li>
						           <span class="folder"><s:property value="marketName"/></span> 
						           <ul>
						             <s:iterator value="%{#application.ALL_SEGMENT}" id="segmentList">
												<li>
													<span class="file">
													   <a href="www.google.com" class="navTree">
														<s:property value="segmentName"/>
													   </a>
													</span>
												</li>
									</s:iterator>
						           </ul>
						        </li>
						    </s:if>
						    <s:else>
						       <s:if test="#preMakeId!=0">
						         </ul>
						         </li>						         
						       </s:if>
						       
						       <s:set var="checkFlag" value="1" />
						       
						        <li><span class="folder"><s:property value="makeName"/></span>
						        <ul>
									<li><span class="folder"><s:property value="marketName"/></span> 
								      <ul>
										<s:iterator value="%{#application.ALL_SEGMENT}" id="segmentList">
												<li>
												 <span class="file">
													<a onclick="fetchFactEntryForm(<s:property value='makeId'/>,<s:property value='marketId'/>,<s:property value='segmentId'/>)"  class="navTree">
														<s:property value="segmentName"/>
													</a>
												 </span>
												</li>
										</s:iterator>
									  </ul>
									 </li>
							    
						    </s:else>
						     	  
						    <s:set var="preMakeId" value="makeId" /> 	  
						</s:iterator> 
						
						 <s:if test="#checkFlag==0">
						         </ul>
						         </li>						         
						 </s:if>
						       
						</ul>
                   </div> 
                   
                   <div style="margin-top: 20px;">
                   <div class="span2" id="yearSelectBox">
                   <select id="yearSelectBox">
                    <option value="2013" <s:if test="selectedYear==2013">selected="selected"</s:if>>2013</option>
                    <option value="2012" <s:if test="selectedYear==2012">selected="selected"</s:if>>2012</option>
                    <option value="2011" <s:if test="selectedYear==2011">selected="selected"</s:if>>2011</option>
                   </select>
                   </div>
                   
                   <div class="span2" style="margin-top: 20px;">
                    <select name="select" class="nostyle" size="12"  style="width:170px" id="monthSelectBox">
                        <option value="1" <s:if test="selectedMonth==1">selected="selected"</s:if>>January</option>
                        <option value="2" <s:if test="selectedMonth==2">selected="selected"</s:if> >February</option>
                        <option value="3" <s:if test="selectedMonth==3">selected="selected"</s:if>>March</option>
                        <option value="4" <s:if test="selectedMonth==4">selected="selected"</s:if>>April</option>
                        <option value="5" <s:if test="selectedMonth==5">selected="selected"</s:if>>May</option>
                        <option value="6" <s:if test="selectedMonth==6">selected="selected"</s:if>>June</option>
                        <option value="7" <s:if test="selectedMonth==7">selected="selected"</s:if>>July</option>
                        <option value="8" <s:if test="selectedMonth==8">selected="selected"</s:if>>August</option>
                        <option value="9" <s:if test="selectedMonth==9">selected="selected"</s:if>>September</option>
                        <option value="10" <s:if test="selectedMonth==10">selected="selected"</s:if>>October</option>
                        <option value="11" <s:if test="selectedMonth==11">selected="selected"</s:if>>November</option>
                        <option value="12" <s:if test="selectedMonth==12">selected="selected"</s:if>>December</option>
                    </select>
                   </div>
                   
                   </div>
                   
                   <form method="post" action="factEntryForm.action" id="factParamForm"  name="factParamForm">
                    <input type="hidden" name="factEntryParam.makeId" id="makeId" value="" />
                    <input type="hidden" name="factEntryParam.marketId" id="marketId" value="" />
                    <input type="hidden" name="factEntryParam.segmentId" id="segmentId" value="" />
                    <input type="hidden" name="factEntryParam.selectedMonth" id="selectedMonth" value="" />
                    <input type="hidden" name="factEntryParam.selectedYear" id="selectedYear" value="" />
                   </form>
                </s:elseif>
            </div><!-- End sidenav -->
            <!-- End .sidenav-widget -->
        </div>
        <!-- End #sidebar -->
        